<template>
  <view class="content">
    <image class="logo" src="/static/logo.png" />
    <view class="text-area" >
      <text class="title">{{ s.num }}</text>
    </view>
    <up-button type="primary" @click="add" :plain="true" text="跳转"></up-button>
    <up-button type="primary" @click="req" :plain="true" text="请求测试"></up-button>
  </view>
</template>

<script setup lang="ts">
import {baseStore} from "@/store/base";
import {Env} from "@/env/index";
import * as a from "@/env/index";
import {Get} from "@/request/methods";
let s=baseStore()

console.log("环境变量",Env())
console.log("代码",a)

let  add=()=>{
  s.num++;
  uni.navigateTo({
    url:"/pages/home/index"
  })
}


let req=()=>{

  Get("/test",{time:0.1}).then(res=>{
    console.log("rrr",res)
  })
  Get("/test",{time:2}).then(res=>{
    console.log("rrr",res)
  })
  Get("/test",{time:4}).then(res=>{
    console.log("rrr",res)
  })
  Get("/test",{time:0.1}).then(res=>{
    console.log("rrr",res)
  })
}

</script>

<style lang="scss" scoped>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding: 40rpx;
  height: 500rpx;

  .logo {
    height: 200rpx;
    width: 200rpx;
  }


  .text-area {
    display: flex;
    justify-content: center;
    width: 375rpx;
    padding: 14px;
    border-radius: 8px;
    background: #187bac;
  }

  .title {
    font-size: 36rpx;
    color: #fff;
  }
}



</style>
